Visual Basic 5.0 Program: "VB Two Body"

The program VB Two_body uses the standard Newton's Law to calculate the masses of 2 objects based on observations written in Visual Basic 5.0.
Newton's Law assumes that the sum of all the forces of all objects is zero.
Newton's Law law describes that the force between two objects is "equal" to the mass m1 times the mass m2 of each object divided by the distance. Because this force acts twice but in opposite directions as such the sum is zero. Because this is true for all objects and all forces the sum of all forces is zero.

VB Program: "VB Two_Body" Operation

The program uses two display or forms: Control Display, Simulation Display

Control Display

The Control Display contains 5 selection keys to modify the observed positions of object 1.
  • The "TAB" key is used to select the observation you want to modify. The selected obsvervation has the colour RED.
  • The "x RIGHT" key moves the point one unit to the right in the +X direction
  • The "x LEFT" key moves the point one unit to the left in the -X direction
  • The "y UP" key moves the point one unit in the up direction, +Y direction
  • The "y DOWN " key moves the point one unit in the down, -Y direction
It is important to understand that X movement is independent that means when of one observation the X direction is changed the other observations are not changed.
For the Y movement this is different. See Operation Example For more details.
The Control Display contains the following parameters: The VB program is controlled by two Commands:

Simulation Display

When you select the Calculate Command you will observe the Simulation Display. This display shows two circles. The two green spots and the one red spot on the outer circle are the three observed positions.
When the TAB Key is selected you will observe that the position of the red spot changes.

The blue spot is the centre of gravity.


Operation Example

VB Program: "VB Two_Body" source

In order to get the Visual Basic 5.0 source and the executable program use the following zip file:VB Two_Body.zip
The Zip files contains the following 6 files: The Visual Basic Executable program requires MSVDVM50.DLL: Msvdvm50.dll.zip


Reflection

The most important message of the whole simulation is that the concept mass is of almost no physical importance to perform this simulation.
What is extremely important are the observations. Based on the observations the mass values are calculated using Newton's Law and the path of the two objects in the future can be calculated.


Feedback

No feedback received.


First Release: 5 November 2014

Back to Celestial mechanics for dummies?
Back to my home page Contents of This Document